﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;

namespace MxTol.Models
{
    /// <summary>
    /// 财经法规案例分析题资料文字描述
    /// </summary>
    [ActiveRecord(Table = "Fr_Analysis_Descripe")]
    public class FrAnalysisDescripe:ActiveRecordBase
    {
        /// <summary>
        /// 题目主键
        /// </summary>
        [PrimaryKey("id")]
        public Guid ID { get; set; }

        /// <summary>
        /// 资料描述文本
        /// </summary>
        [Property("descripe")]
        public string Title { get; set; }

        /// <summary>
        /// 题目添加入
        /// </summary>
        [Property("add_person")]
        public string AddPerson { get; set; }

        /// <summary>
        /// 该条记录添加时间
        /// </summary>
        [Property("add_time")]
        public DateTime AddTime { get; set; }

        /// <summary>
        /// 根据主键获取案例资料文字描述
        /// </summary>
        public static FrAnalysisDescripe GetDescripeByID(Guid id)
        {
            FrAnalysisDescripe descripe = (FrAnalysisDescripe)FindByPrimaryKey(typeof(FrAnalysisDescripe), id);
            if (descripe != null)
            {
                return descripe;
            }
            else
            {
                return null;
            }
        }
    }
}
